import RootView from "~/views/RootView";
import Vue from 'vue'
import DataVisualization from "~/views/DataVisualization";
import MonitorManagement from "~/views/risk-monitor/MonitorManagement.vue";
import RiskDynamicJudgementBody from "~/views/risk-dynamic-judgement/RiskDynamicJudgementBody.vue";
import WarningReception from "~/views/risk-warning/WarningReception.vue";
import WarningRemember from "~/views/risk-warning/WarningRemember.vue";
import DangerStatistic from "~/views/risk-warning/DangerStatistic.vue";
import AlarmReminder from "~/views/emergency-rescue/AlarmReminder.vue";
import RescueSupport from "~/views/emergency-rescue/RescueSupport.vue";
import HistoricalAccident from "~/views/emergency-rescue/HistoricalAccident.vue";
import DownstreamDeficiencyAnalysis from "~/views/risk-assessment/DownstreamDeficiencyAnalysis.vue";
import PondRiskAssessment from "~/views/risk-assessment/PondRiskAssessment.vue";
import RegionalRiskAssessment from "~/views/risk-assessment/RegionalRiskAssessment.vue";
import InformationRelease from "~/views/system-management/InformationRelease.vue";
import TailingpondInfor from "~/views/system-management/TailingpondInfor.vue";
import UnitManagement from "~/views/system-management/UnitManagement.vue";
import UnitInfor from "~/views/system-management/UnitInfor.vue";
import AuthorityManagement from "~/views/system-management/AuthorityManagement.vue";
import UserManagement from "~/views/system-management/UserManagement.vue";
import EmptyRouter from "~/components/EmptyRouter";
import Login from "~/views/Login.vue";
import OneImage from "~/views/OneImage";

export const PLATFORM_KEY = "enterprise";

//根目录
export const ROOT = "/";
// 登录页面
export const LOGIN = "/login";
//一张图
export const INDEX = "index";
//风险综合监测
export const RISK_MONITOR = "risk-monitor";
//风险综合监测-数据汇聚可视化
export const DATA_VISUALIZATION = "data-visualization";
//风险综合监测-监测系统管理
export const MONITORING_MANAGEMENT = "monitoring-management";
//风险智能评估
export const RISK_ASSESSMENT = "risk-assessment";
//风险智能评估-下游匮乏分析
export const DOWNSTREAM_DEFICIENCY_ANALYSIS = "downstream-deficiency-analysis";
//风险智能评估-尾矿库风险评估
export const POND_RISK_ASSESSMENT = "pond-risk-assessment";
//风险智能评估-区域风险评估
export const REGIONAL_RISK_ASSESSMENT = "regional-risk-assessment";
//风险精准预警
export const RISK_WARNING = "risk-warning";
//风险精准预警-预警接收
export const WARNING_RECEPTION = "warning-reception";
//风险精准预警-预警提醒
export const WARNING_REMINDER = "warning-reminder";
//风险精准预警-隐患统计
export const DANGER_STATISTICS = "danger-statistics";
//风险态势动态研判
export const RISK_DYNAMIC_JUDGEMENT = "risk-dynamic-judgement";
//风险态势动态研判-body
export const RISK_DYNAMIC_JUDGEMENT_BODY = "judgement";
//应急救援
export const EMERGENCY_RESCUE = "emergency-rescue";
//应急救援-接警提醒
export const ALARM_REMINDER = "alarm-reminder";
//应急救援-救援支持
export const RESCUE_SUPPORT = "rescue-support";
//应急救援-历史事故查询
export const HISTORICAL_ACCIDENT = "historical-accident";
//系统管理
export const SYSTEM_MANAGEMENT = "system-management";
//系统管理-信息发布
export const INFORMATION_RELEASE = "information-release";
//系统管理-企业端管理
export const UNIT_MANAGEMENT = "unit-management";
//系统管理-尾矿库信息
export const TAILINGPOND_INFOR = "tailingpond-infor";
//系统管理-企业信息
export const UNIT_INFOR = "unit-infor";
//系统管理-权限管理
export const AUTHORITY_MANAGEMENT = "authority-management";
//系统管理-用户管理
export const USER_MANAGEMENT = "user-management";

const routers = [{
        path: LOGIN,
        component: Login,
        name: LOGIN,
    },
    {
        name: INDEX,
        path: ROOT + INDEX,
        component: OneImage,
    }, {
        path: ROOT + RISK_MONITOR + "/" + DATA_VISUALIZATION,
        component: DataVisualization,
    },
    {
        path: ROOT,
        component: RootView,
        redirect: {
            name: LOGIN,
        },
        children: [{
                path: RISK_MONITOR,
                component: EmptyRouter,
                children: [{
                    path: MONITORING_MANAGEMENT,
                    component: MonitorManagement,
                }],
            },
            {
                path: RISK_ASSESSMENT,
                component: EmptyRouter,
                children: [{
                    path: DOWNSTREAM_DEFICIENCY_ANALYSIS,
                    component: DownstreamDeficiencyAnalysis,
                }, {
                    path: POND_RISK_ASSESSMENT,
                    component: PondRiskAssessment,
                }, {
                    path: REGIONAL_RISK_ASSESSMENT,
                    component: RegionalRiskAssessment,
                }],
            },
            {
                path: RISK_WARNING,
                component: EmptyRouter,
                children: [{
                    path: WARNING_RECEPTION,
                    component: WarningReception,
                }, {
                    path: WARNING_REMINDER,
                    component: WarningRemember,
                }, {
                    path: DANGER_STATISTICS,
                    component: DangerStatistic,
                }],
            },
            {
                path: RISK_DYNAMIC_JUDGEMENT,
                component: EmptyRouter,
                children: [{
                    path: RISK_DYNAMIC_JUDGEMENT_BODY,
                    component: RiskDynamicJudgementBody,
                }],
            },
            {
                path: EMERGENCY_RESCUE,
                component: EmptyRouter,
                children: [{
                    path: ALARM_REMINDER,
                    component: AlarmReminder,
                }, {
                    path: RESCUE_SUPPORT,
                    component: RescueSupport,
                }, {
                    path: HISTORICAL_ACCIDENT,
                    component: HistoricalAccident,
                }],
            },
            {
                path: SYSTEM_MANAGEMENT,
                component: EmptyRouter,
                children: [{
                        path: INFORMATION_RELEASE,
                        component: InformationRelease,
                    },
                    {
                        path: UNIT_MANAGEMENT,
                        component: UnitManagement,
                    },
                    {
                        path: TAILINGPOND_INFOR,
                        component: TailingpondInfor,
                    },
                    {
                        path: UNIT_INFOR,
                        component: UnitInfor,
                    },
                    {
                        path: AUTHORITY_MANAGEMENT,
                        component: AuthorityManagement,
                    }, {
                        path: USER_MANAGEMENT,
                        component: UserManagement,
                    },
                ],
            },
        ],
    },
];

export default routers;